package cn.chia.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.chia.front.dao.IGroupPurDAO;
import cn.chia.pojo.TblGroupPurchase;
import cn.chia.service.IGroupPurService;

@Service
public class GroupPurServiceImpl implements IGroupPurService {
	private IGroupPurDAO groupPurDAOImpl;
	
	
	public List<TblGroupPurchase> findAll() throws Exception {
		return groupPurDAOImpl.findAll();
	}



	public List<TblGroupPurchase> findByState() throws Exception {
		return groupPurDAOImpl.findByState();
	}

	
	public TblGroupPurchase findGroupById(Integer id) throws Exception {
		return groupPurDAOImpl.findGroupById(id);
	}



	public void addGroup(TblGroupPurchase tblGroupPurchase) throws Exception {
		groupPurDAOImpl.addGroup(tblGroupPurchase);
	}



	public void modifyGroup(TblGroupPurchase tblGroupPurchase) throws Exception {
		groupPurDAOImpl.updateGroup(tblGroupPurchase);
	}



	public void modifyState(String id) throws Exception {
		groupPurDAOImpl.updateState(id);
	}
	
	
	
	@Resource(name="groupPurDAOImpl")
	public void setGroupPurDAOImpl(IGroupPurDAO groupPurDAOImpl) {
		this.groupPurDAOImpl = groupPurDAOImpl;
	}


}
